<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/js/model_view.js"></script>
<head th:include="/base/common_css('test')">
<body>
<div th:include="/base/common_banner"></div>
<!-- Main content starts -->

<div class="content">
    <!-- Sidebar -->
    <div th:include="/base/common_menu"></div>
    <!-- Sidebar
    <div class="sidebar">
        <div class="sidebar-dropdown"><a href="#">Navigation</a></div>

    </div>-->
    <!-- Matter -->
    <div class="mainbar">
        <!-- Page heading -->
        <div th:include="/base/common_pageHeader"></div>

        <div class="matter">
            <div class="container">
                <div class="row">
                    <div class="col-md-6">


                        <div class="widget wgreen">

                            <div class="widget-head">
                                <div class="pull-left">模特编辑</div>
                                <div class="widget-icons pull-right">
                                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a>
                                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                                </div>
                                <div class="clearfix"></div>
                            </div>

                            <div class="widget-content">
                                <div class="padd">

                                    <!-- Form starts.  -->
                                    <form class="form-horizontal" role="form" action="#" method="post">

                                        <div class="modal-body">
                                            <form action="#" method="post"
                                                  enctype="multipart/form-data">
                                                <input class="col-lg-4 form-control " type="hidden" id="modelId"
                                                       th:value="${modelId}">
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">模特名字</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${modelName}" class="form-control"
                                                               id="modelName" placeholder="模特名"
                                                               onclick="checkvalue(1,this);"
                                                               onkeyup="checkvalue(1,this);" title="由2-16中文,英文，数字组成"><label
                                                            id="tip1"
                                                            style="color:#12aeff;font-size:12px"></label>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">模特昵称</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${nickName}" class="form-control"
                                                               id="nickName" placeholder="昵称"
                                                               onclick="checkvalue(2,this);"
                                                               onkeyup="checkvalue(2,this);" title="由2-16中文,英文，数字组成"><label
                                                            id="tip2"
                                                            style="color:#12aeff;font-size:12px"></label>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">模特头像</label>

                                                    <div class="col-lg-1">
                                                        <img th:src="${modelIconLocal}"
                                                             style="width: 60px;height: 80px;" class="model_Icon">
                                                        <input type="hidden" id="uploadIcon" th:value="${modelIcon}">
                                                    </div>

                                                    <div class="col-lg-8">
                                                        <button class=" col-lg-1 btn btn-success pull-left"
                                                                data-toggle="modal"
                                                                data-target="#addCate">选择
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">模特封面</label>

                                                    <div class="col-lg-1">
                                                        <img th:src="${modelCoverLocal}"
                                                             style="width: 60px;height: 80px;"
                                                             class="cover_Icon">
                                                        <input type="hidden" id="uploadCover" th:value="${modelCover}">
                                                    </div>

                                                    <div class="col-lg-8">
                                                        <button class=" col-lg-1 btn btn-success pull-left"
                                                                data-toggle="modal"
                                                                data-target="#addCate1">选择
                                                        </button>
                                                    </div>


                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">性别</label>
                                                    <div class="col-lg-8">
                                                        <select th:value="${sex}" id="sex">
                                                            <option value="0">女</option>
                                                            <option value="1">男</option>

                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">体重</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${weight}" class="form-control"
                                                               onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){
                                                                       this.value=0;};if(this.value>90){this.value=90;}"
                                                               onchange="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){this.value=0;};if(this.value>90){this.value=90;}"
                                                               id="weight" placeholder="体重">
                                                    </div>

                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">身高</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${height}" class="form-control"
                                                               onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){
                                                                       this.value=0;};if(this.value>200){this.value=200;}"
                                                               onchange="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){this.value=0;};if(this.value>200){this.value=200;}"

                                                               id="height" placeholder="身高">
                                                    </div>

                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">胸围</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${bust}" class="form-control"
                                                               onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){
                                                                       this.value=0;};if(this.value>100){this.value=100;}"
                                                               onchange="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){this.value=0;};if(this.value>100){this.value=100;}"

                                                               id="bust" placeholder="胸围">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">腰围</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${waistline}" class="form-control"
                                                               onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){
                                                                       this.value=0;};if(this.value>100){this.value=100;}"
                                                               onchange="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){this.value=0;};if(this.value>100){this.value=100;}"

                                                               id="waistline" placeholder="腰围">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">臀围</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${hipline}" class="form-control"
                                                               onkeyup="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){
                                                                       this.value=0;};if(this.value>100){this.value=100;}"
                                                               onchange="javascript:this.value=this.value.replace(/[^\d]/g,'');if(this.value<0){this.value=0;};if(this.value>100){this.value=100;}"

                                                               id="hipline" placeholder="臀围">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">职业</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${modelJob}" class="form-control"
                                                               id="modelJob" placeholder="职业">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">国家</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${country}" class="form-control"
                                                               id="country" placeholder="国家">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-lg-4 control-label">城市</label>
                                                    <div class="col-lg-8">
                                                        <input type="text" th:value="${city}" class="form-control"
                                                               id="city" placeholder="城市">
                                                    </div>
                                                </div>
                                            </form>
                                        </div>

                                    </form>
                                    <div class="modal-footer">
                                        <button type="button" onclick="saveModel()"
                                                class=" btn btn-success ">保存
                                        </button>
                                        <button type="button" class="btn btn-cancel"
                                                onclick="cancles()">取消
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="addCate" tabindex="-1" role="dialog"
     aria-labelledby="addCateLabel">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    上传图片
                </h4>
            </div>
            <div class="modal-body ">
                <form class="form-horizontal" role="form" action="/view/uploadModelIcon" enctype="multipart/form-data"
                      method="post">
                    <div class="form-group">
                        <label class="col-lg-4 control-label">文件上传</label>
                        <div class="col-lg-8">
                            <input id="fileName" type="file" class="form-control pull-right">
                        </div>
                        <button type="button" class="btn btn-success" onclick="iconUpload()">
                            上传
                        </button>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-4 control-label">是否压缩</label>
                        <div class="col-lg-8">
                            <div class="col-lg-8" style="height: 28px">
                                <div class="make-switch" id="isZip" data-on="primary" data-off="info">
                                    <input type="checkbox" checked value="1" data-th-size="small">
                                </div>
                            </div>
                        </div>
                    </div>
                    <hr/>

                </form>


            </div>
            <div class="modal-footer">


                <button type="button" class="btn btn-default" data-dismiss="modal"
                        onclick="close()">确定
                </button>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>

    <div class="clearfix"></div>
</div>
<div class="modal fade" id="addCate1" tabindex="-1" role="dialog"
     aria-labelledby="addCateLabel">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel1">
                    上传图片
                </h4>
            </div>
            <div class="modal-body ">
                <form class="form-horizontal" role="form"  enctype="multipart/form-data" method="post">
                    <div class="form-group">
                        <label class="col-lg-4 control-label">文件上传</label>
                        <div class="col-lg-8">
                            <input id="fileName1" type="file" class="form-control pull-right">
                        </div>
                        <button type="button" class="btn btn-success" onclick="coverUpload()">
                            上传
                        </button>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-4 control-label">是否压缩</label>
                        <div class="col-lg-8">
                            <div class="col-lg-8" style="height: 28px">
                                <div class="make-switch"  data-on="primary" data-off="info">
                                    <input type="checkbox" id="isZip1" checked value="1" data-th-size="small">
                                </div>
                            </div>
                        </div>
                    </div>
                    <hr/>

                </form>


            </div>
            <div class="modal-footer">


                <button type="button" class="btn btn-default" data-dismiss="modal"
                        onclick="close()">确定
                </button>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>

    <div class="clearfix"></div>
</div>

<!-- Mainbar ends -->
<div class="clearfix"></div>

</div>
<!-- Content ends -->

<div th:include="/base/common_footer"></div>
<!-- Scroll to top -->
<span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span>
<!--js????-->
<div th:include="/base/common_js"></div>


</body>
</html>